package gov.fgn.sijyp.security.auth.spi;

import java.util.logging.Logger;

import javax.security.auth.login.LoginException;

import org.jboss.security.auth.spi.DatabaseServerLoginModule;

public class DatabaseServerLoginModuleAdapter extends DatabaseServerLoginModule {

	private static Logger LOG = Logger.getLogger(DatabaseServerLoginModuleAdapter.class.getName());
	
	@Override
	protected String createPasswordHash(String username, String password, String digestOption)
			throws LoginException {
		//LOG.info("Password: " + password);
		String encryped = super.createPasswordHash(username, password, digestOption);
		encryped = encryped != null && !encryped.isEmpty() ? encryped.toUpperCase() : encryped;
		//LOG.info("Password: " + encryped);
		return encryped;
	}
	
}
